Contents
The PC Plus Windows 3 Help File

Last updated August 1997

CONTENTS

About PC Plus

What is this? / Contacting the author

Credits & copyright

How to edit INI files

Screen savers

Screen printing

Mice in DOS boxes

Protecting Windows

Alternative desktops

The swap file

Random wallpaper

Cardfile exports

Win32s

Bigger DOS boxes

DLL troubles

General Protection Faults

Temporary files

Minesweeper & Solitaire cheats

Closing crash

Windows off-screen

No cursor blinking

Restore the standard icons

Network security

Replace Program Manager with File Manager

Program Manager tips

Customise File Manager's toolbar

Install a RAM drive

SmartMon doesnt work

Running out of resources

Windows' memory limit

How to make your own help file

Group limit in Win3.x

Write tips

The undefined dynalink error

The stack overflow error

Quick directory access

Maximising windows of applications opened from Program Manager

Getting help

The last resort


About PC Plus

For over 11 years PC Plus has been one of the UK's leading PC magazines. It is published by Future Publishing:

Future Publishing

30 Monmouth St.,

BATH

BA1 2BW

United Kingdom

+44 (0)1225 442244 (main switchboard)

+44 (0)1225 822511 (subscriptions), email subs@futurenet.co.uk

Each month PC Plus carries news, reviews, tutorials and a cover-mounted CD (the SuperCD) containing hundreds of megabytes of software. The SuperCD usually has fully working commercial software, free for you to use. Past releases have included Delphi 1, dBase for Windows, Paradox and Lotus SmartSuite 97 Preview Edition. Find PC Plus on the Web at www.pcplus.co.uk!

Return to contents page


What is this?

Help Screen has long been one of the most popular features in PC Plus. It answers technical questions from readers and publishes tips and advice on hardware and popular software.

Almost all the commonly asked questions about Windows 3.x have been tackled in Help Screen at some time, but it is difficult to find the answer in your pile of back issues even if you have the relevant one. And with Win95 dominating my mailbag by virtue of its newness, Win3 users may be feeling left out in the cold. This help file redresses the balance by collecting together all the material published about Win3 in recent Help Screens. This file will be updated as more information is published.

Ian Sharpe

isharpe@futurenet.co.uk

c/o PC Plus

Future Publishing

30 Monmouth St.,

BATH

BA1 2BW

United Kingdom

Fax: +44 (0)1225 732295

Please read the next section before contacting Help Screen…

Submitting questions, updates & tips

We're always happy to receive questions, tips, and follow-ups to material already published. These may be sent by email, post or fax, but we cannot accept phone calls. As a strict rule we cannot offer help and advice on a personal basis. Publishing one of the UK's leading computer magazines is no small task each month, and we haven't the time or resources to be a help line as well. The only way we reply is via the pages of the magazine, but please note that we don't have room to publish everything sent to us. Submissions are mainly chosen on the basis of length, solvability, and interest to other readers.

If your question is critical or urgent, it is best put to the relevant manufacturer or supplier. If that is inappropriate or does not bring a result, a message posted to an Internet newsgroup or a forum within commercial on-line services such as CompuServe, AOL or CIX may bring useful advice. The newsgroup search engine at www.dejanews.com is probably the best place to look.

As a last resort in desperate cases, you should seek local professional advice.

If your question relates to a problem with the SuperCD or Disk, our hotline will try to help with installation difficulties or similar problems (though not teach you how to operate the software, DOS or Windows). The email address is support@futurenet.co.uk or phone 01225 442244. It operates Monday to Friday, 9.30am to 5.30pm.

Queries regarding subscriptions, back issues and Future mail order should be sent to subs@futurenet.co.uk or phone 01225 822511 during office hours.

General comments about PC Plus should be sent to pcplus@futurenet.co.uk.

Note: the author of this file does know how to use apostrophes but the help file compiler takes them out at random. This should be sorted out at some point.

Return to contents page


Credits & copyright

Copyright to this help file is held by Ian Sharpe. You have permission to use it for personal, not-for-profit purposes, at home or at work. Permission to use all or part of it on an Internet site or in a commercial product such as a book is specifically forbidden, except when granted by me. The information in this file comes from many sources and I am particularly grateful to PC Plus readers too numerous to name for supplying information or prompting me to go and look for it. Russell Boyatt deserves special mention for the pile of tips he sent for the Help Screen in issue 131 of PC Plus.

Return to contents page


How to edit INI files

In several places in this help file I say that you should edit an INI file. It is always a good idea to back up INI files before changing them - a slip of the finger can bring Windows to its knees. If SYSTEM.INI or WIN.INI have to be changed, the quickest way is to go to File, Run and type SYSEDIT to run System Configuration Editor. This is also a quick way to get at CONFIG.SYS and AUTOEXEC.BAT. To edit other INI files, run Notepad and load them from there. In the Open dialog display the available files by entering *.INI in the File Name box. Many INI file settings only take effect after you have saved the file and restarted Windows, or at least restarted the program to which the INI file belongs.

Return to contents page


Screen savers

You can start up a screen saver at the touch of a key, for example to hide the screen at a moments notice, perhaps with password protection. Edit WIN.INI and add SCR to the PROGRAMS= line in the [Windows] section. Save the file and restart Windows. SCR files can now be run like other programs  double-clicking them in File Manager, for example. You can now set up Program Manager icons for individual savers, complete with hotkeys.

Return to contents page


Screen printing

Utilities exist which make it easy to take a snapshot of the screen for immediate printing or for inclusion as a graphic in a document. However, Win3 has its own method which is fine for occasional use. Press the [Print Screen] key (to the right of [F12] on most keyboards). This copies the screen to the clipboard. Start up a bitmap graphics editor such as Paintbrush in the Accessories group, and press [Ctr][V] to paste it in. You can now save and print as required. To capture just the current window, press [Alt][Print Screen].

Return to contents page


Mice in DOS boxes

If you want to use the mouse in a DOS box running as a window, edit the SYSTEM.INI file in your Windows directory. In the [NonWindowsApp] section insert this line:

MouseInDOSBox=1

Save the file and restart Windows.

Return to contents page


Protecting Windows

You can buy some pretty potent software which will add the equivalent of chains and padlocks to Windows. But for everyday use, where you want just enough control to deter the ignorant for a short time, there are simpler measures you can take.

Program Manager has available several security features you can turn on by editing PROGMAN.INI. Add a new section heading:

[Restrictions]

Under here you may add the following settings:

norun=1	The Run command in the File menu becomes inaccessible

noclose=1	Disables the ability to exit from Windows with [Alt][F4] or File, Exit.

nosavesettings=1	Disables the ability to save changes to Program Manager settings.

nofilemenu=1	Disables the File menu in Program Manager.

editlevel=1	Disables creation, deletion or renaming of groups.

editlevel=2	As above, plus the user cant edit program item settings.

editlevel=3	As above, plus inability to change the command line entry in a programs properties setting.

editlevel=4	Everything on levels 1-3, plus no changes at all to an items properties.

Save PROGMAN.INI and restart Windows to bring the changes into effect.

It is possible to limit the icons which show in Control Panel. In CONTROL.INI add a new section:

[dont load]

Under here put the names of icons you want to be excluded form Control Panel. Follow each one with an = sign and then some non-blank character, for instance:

Fonts=x

Printers=x

Even with this lot switched on, a moderately skilled user can side-step the restrictions and it is still possible to do things with Control Panel, File Manager and the DOS prompt. You could remove the icons, of course, but thats still no protection against a simple reboot. Neither is there anything to stop somebody changing the INI file settings and restarting Windows. Specifying a password in the BIOS set-up screen can help, and you can make AUTOEXEC.BAT fairly immune to interruption, but what if somebody tries to start from a floppy disk? Again, a BIOS setting can often be made to disable booting from floppy disk.

It is impossible to totally secure a PC without preventing legitimate users from doing legitimate things. You can only apply a level of protection which is an acceptable compromise between security and productivity.

If you want to restrict access to individual programs, there is a further step. On issue 131's SuperCD was a program called PASSWORD.EXE. It should be placed in \WINDOWS along with VBRUN300.DLL.

Use Program Managers File, Run command to execute this command line:

PASSWORD.EXE /S

This brings up a dialog box which enables you to change the password from its default setting of dropthebird. One password applies to every program you want to protect.

For each program to which you want to restrict access, select its icon and bring up its Properties dialog. Click Change Icon and make a note of the filename in the box. Go back to the Properties dialog. Suppose the existing command line is this:

C:\MYDIR\PROGNAME.EXE /T

Change it to:

PASSWORD C:\MYDIR\PROGNAME.EXE /T

Click Change Icon again and restore the filename to the one you noted earlier. OK you way back to Program Manager. From now on, whenever you double-click the program's icon, you will be asked for the password before being allowed further.

Return to contents page


Alternative desktops

Windows 95 has a nice feature whereby different users can log on to a machine and have their own desktops. Win3 does not support this, but it can be simulated. Two of the many situations where this can be useful are to present a customised set of Program Manager groups for particular users - your children, for example - or to have your own desktop with a lower level of security options than the usual configuration.

The file PROGMAN.INI contains a list of groups on the desktop, and also the security settings detailed in the previous section. Make a subdirectory in which you make a copies of  PROGMAN.INI, one for each user. Each file will have its own name - for example JANET.INI, JOHN.INI, THEKIDS.INI. Edit each copy to set the appropriate level of restrictions and tailor the list of groups. Any group deleted must have its number eliminated from the [Order] section, too. Additional groups must have their numbers inserted under [Order].

You now need a way to copy the required version of PROGMAN.INI into the WINDOWS directory before Windows starts up. The easiest way is to rename WIN.COM - the program which starts Windows - to RUNWIN.COM and provide a batch file called WIN.BAT. When the WIN command is executed from the DOS command line, the batch file will be run instead of WIN.COM. The renamed WIN.COM is run as the final command in WIN.BAT. Your copy commands come before that.

If no command line parameter is typed, WIN.BAT copies the default version of PROGMAN.INI - probably the one with the greatest level of security. If provided with a command line parameter, the batch file will copy the version of PROGMAN.INI assigned to that parameter. Here is a sample which you can modify and extend to suit your own system.:

@echo off

if %1""=="" goto default

if %1==pmtest goto pmtest

if %1==PMTEST goto pmtest

REM More IF tests here

goto default

:pmtest

copy c:\windows\proginis\pmtest.ini c:\windows\progman.ini > nul

goto runwin

Rem More sections here

:default

copy c:\windows\proginis\progman.ini c:\windows\progman.ini > nul

:runwin

runwin

Return to contents page


The swap file

When Windows runs out of physical memory it can overflow on to the hard disk. A file known as the swap file is set up specially to hold the overflow. Although the swap file is included in the amount of memory Windows reports, it does not work in the same way as physical memory and the processor cannot access it directly.

When a program tries to read or write data which it thinks is in memory but which in reality has been put into the swap file, Windows has to copy the contents of some other chunk of physical memory on to the disk. It then reloads the data the program wants to access into physical memory. This slows the program down. Windows will appear to be very slow if it is using the swap file a lot, and although there are ways to tune Windows for increased speed, nothing beats fitting extra memory. It is so cheap these days that 16Mb is a realistic minimum to fit to most PCs.

Disk space masquerading as RAM is known as virtual memory. There are two kinds of swap file, permanent and temporary. If you dont have a permanent swap file installed, Windows will automatically create a temporary one. A permanent swap file is a hidden file called 386SPART.PAR. Do not delete this, even if Windows is not running.

People often ask whether a permanent or temporary swap file is best. A permanent swap file is by far the more desirable because it is quicker to access and so enables Windows to operate much faster when swapping memory to and from disk. There are two main reasons why you would opt for a temporary swap file:

•	Your are very short on disk space and spend most of your time in DOS.

•	A permanent swap file is incompatible with your hard disk controller.

On PCs with a lot of memory - say 20Mb or more - it may be beneficial to run Windows without any kind of swap file. Even when it hasn't run out of RAM, Windows will read and write the file. Eliminating the file will cut that out. However, you risk data loss if Windows does run out of memory. Windows is actually less efficient in its use of physical memory when there is no swap file available, so the point at which memory becomes exhausted comes sooner.

You can set the type of swap file from the Enhanced section of Control Panel. Click the Virtual Memory button and then on Change. Windows will recommend a size which is a multiple of the physical RAM fitted, so it can amount to a substantial proportion of the hard disk on a well-specified machine. In such a case cut the size to 20Mb, say, and see how it goes.

The permanent swap file needs to be on unfragmented disk space, so run your disk defragmenter before setting one up. Swap files are of no benefit to DOS programs run from within Windows, other than to enable Windows to make enough memory free to run the program in the first place.

Return to contents page


Random wallpaper

If you want different wallpaper every time you start the PC, copy the program code below into a text file called RANDWALL.BAS, placed in your Windows directory. At the bottom of the file are three lines each beginning with a number, then DATA. Lines 240 and 250 list BMP files to be used as random wallpaper. Change the names to suit yourself. The only constraint is that the final data item must be nomore, without the quotes. Line 150 will need changing if your Windows directory is not \WINDOWS. Save the modified file.

Insert the following line in AUTOEXEC.BAT after the PATH statement:

QBASIC /RUN C:\WINDOWS\RANDWALL.BAS

Go back to the Windows directory and make a copy of one of the BMP files, naming it TODAY.BMP. Go into Control Panel and name TODAY.BMP as the wallpaper file.

Henceforth, RANDWALL.BAS will be invoked from AUTOEXEC.BAT on start-up. It will pick one of the wallpaper files at random and copy it to TODAY.BMP. You must, of course, have QBASIC.EXE in a directory named in the PATH statement in AUTOEXEC.BAT. RANDWALL.BAS is not the last word in wallpaper randomisers, but it works and you can modify it if you dont mind a spot of Basic programming.

10 ' *** Randomise the Windows wallpaper on each boot-up ***

20 ' Windows must be set up to use a wallpaper file called TODAY.BMP

30 ' Edit the final few lines of this file to incoporate the names

40 ' of graphics files that you want to become wallpaper

45 DIM I$(200)

50 RANDOMIZE TIMER

60 I = 1: READ I$(I)

70 WHILE I$(I) <> "nomore"

80   I = I + 1

90   READ I$(I)

100 WEND

110 IF I = 1 THEN PRINT "No data to read": SYSTEM

120 R = 1 + INT(RND * (I - 1))

130 ' If your bitmap files are not in \WINDOWS, change the 2 references

140 ' in the next line to name the correct directory

150 COPY$ = "copy \windows\" + I$(R) + " \windows\today.bmp"

160 PRINT COPY$

170 SHELL COPY$

180 SYSTEM

190 ' Change the next lines to the names of your own files

200 ' Have as many DATA items/lines as you like but the final

210 ' item MUST be 'nomore' (lower case) to mark the end of

220 ' the list. Don't forget the comma between items on the

230 ' same line.

240 DATA ARCADE.BMP,ARGYLE.BMP,CASTLE.BMP,EGYPT.BMP,HONEY.BMP

250 DATA REDBRICK.BMP,RIVETS.BMP,SQUARES.BMP,ZIGZAG.BMP

251 ' Add more lines if you like, as long as they are numbered

252 ' greater than 252 and less than 500.

500 DATA nomore

Return to contents page


Cardfile exports

If you want to export data from Cardfile to a text file, install the Generic/Text Only printer driver. Set it to print to file, then print your database. Dont forget to revert to your original printer driver immediately afterwards.

Return to contents page


Win32s

What is it, what good does it do, and where do I get it? These are frequent questions. Windows 3 is a 16-bit operating system. This means Windows and the programs which run on it are built from program instructions which dont take full advantage of the power of the processors in modern PCs. Windows 95 and NT are 32-bit operating systems which do make full use of modern processors. 32-bit programs are potentially faster and can handle memory more efficiently than 16-bit ones.

Although you can run 16-bit programs on Win95/NT, you cant normally run 32-bit ones on Windows 3. However, if you install the Win32s add-on, you can run some 32-bit programs but not all of them. Any software which requires Win32s should include it. Installing Win32s confers no benefit on 16-bit software and has nothing to do with 32-bit disk and file access.

With, say, 32Mb of memory it ought to be possible to run 16-bit software on Windows 3.11 without a swap file unless you are manipulating exceptionally large amounts of data or running several big applications simultaneously.

Removing the swap file saves disk space, of course, but Windows runs faster too. This is because even when it is not having to write big chunks of memory to disk, with a swap file available Windows does spend time fiddling around with it.

However, after reading through some of Microsofts technical information, it seems that Win32s programs either demand or work more efficiently with a swap file, although you may get away with a setting of only 2048K. Id try that and gradually work upwards if you encounter problems.

Return to contents page


Bigger DOS boxes

Load the SYSTEM.INI file. In the [NonWindowsApp] section insert:

ScreenLines=nn

where nn is the number of lines of text you want to display in a DOS box, for example 50. Remember that not all applications will make use of more than the default 25 lines.

Return to contents page


DLL troubles

One of the commonest sources of trouble is DLL files. Their main purpose is to act as libraries of program code and data used by more than one application. Suppose a programmer writes two applications which have spelling checkers. To avoid duplicating the part of the program which handles the spelling check, it is put into a DLL file. Both applications can then run the programs in the DLL. And so, applications which use DLLs are smaller on average than those that dont. DLLs also bring a degree of standardisation to applications. For example the program routines which draw windows on the screen are in DLL files. All programs use them, so all windows follow the style set by Microsoft.

One of the problems with DLLs is that a popular one, by definition, is used by a lot of applications. Each of these will have installed a copy of the DLL, possibly overwriting one that was there previously. There may not be a problem if more than one version of the DLL exists, but it is quite possible that differences between versions will cause some applications to begin misbehaving. The DLL may not contain the expected program routines or data, or an older version may have more bugs. If you install a program and other apps suddenly go wonky, suspect a DLL incompatibility.

Another problem with DLLs arises from the fact that they are often placed in \WINDOWS or \WINDOWS\SYSTEM, rather than the applications own directory. If you delete the application, the DLLs it installed will still be occupying space. If other applications use those DLLs, they need to remain. If nobody else is using them, they are wasting space and should be removed. The problem is to decide which ones you need to keep.

Both these problems and related ones which I havent room to mention make it a good idea to keep track of whats happening to DLLs when new software is installed. When a DLL file is needed by a program, normally Windows 3 will search for it in the following directories and in this order:

1 The working directory, as specified in the File, Properties dialog for the icon in Program Manager;

2 \WINDOWS;

3 \WINDOWS\SYSTEM;

4 Every directory named in the path, from left to right, as specified in AUTOEXEC.BAT;

5 The current directory, which by default will be the one the applications EXE file was loaded from.

The exception to this is when a program has been hard-wired to look for a DLL in a particular place.

Suppose a newly installed program is unhappy with a previously installed DLL which is not the correct version, or that existing applications dont work with the version of a DLL installed by a newcomer. Ideally, all programs would use the same version of the DLL and only one copy would exist. You can try having one of the available versions of the DLL in \WINDOWS or \WINDOWS\SYSTEM, and it may suit all applications. If not, the version which pleases most of them goes with Windows, while the odd programs out have copies of their own placed in their working directories. That way the personal DLLs get picked up before Windows searches down the list of alternative locations.

You may like to adopt the following strategy so that you can watch new DLLs being added to the Windows directories and ensure that existing files dont get overwritten.

In your Windows directory create a subdirectory called DLLS. Add this to your PATH statement in AUTOEXEC.BAT. It is best to put it near the front. Restart the PC and, before you start Windows, move all the DLL files from \WINDOWS and \WINDOWS\SYSTEM into it.

Whenever you install a new program, you can look in \WINDOWS and \WINDOWS\SYSTEM for new DLL files. Check to see if files of those names already exist in the DLLS directory. If so, experiment with having only the later version present. If everything still works, leave things as they are. If applications fall over, try having only the older version. If there is still trouble, have the least troublesome DLL in the DLLS directory, and give other programs their own copies of the one they like.

When you have this system running smoothly, you should look for duplicate copies of DLLs. Program installers often leave DLL files in the applications own directory, either out of thoughtlessness - duplicate DLLs defeat the purpose of having them - or as a trouble-avoidance measure. Seek out duplicates and try having only a central copy in the DLL directory. The way to do this is simply to copy the extra DLL into a temporary directory not in the search path and delete the original. If the application still works, you can delete the moved copy - or move it on to floppy for safety. A lot of disk space can be saved this way.

So how do you locate duplicate DLLs? Many utilities exist to do this. One such is Space Hound which exists in 16- and 32-bit versions. An evaluation edition of the 16-bit Space Hound appeared on issue 131's SuperCD. This and the new 32-bit version can also be obtained over the Internet from http://www.fineware.com/hound.shtml.

An especially troublesome DLL to watch for is CTL3D.DLL. It is one of the most common in circulation and contains the program code responsible for creating 3D dialog boxes. Early in its life Microsoft released the source code which every Tom, Dick and Harry then modified to make a version which suited their own program. Soon, a great many unique versions of CTL3D.DLL were at large. It may be that you have older applications which will only behave if given their own personalised version of CTL3D.DLL. Microsoft has since tried to re-establish a standard with CT3DV2.DLL.

The other main  DLL-related problem you could encounter is an error message from Windows reporting 'Call to undefined dynalink'. This happens when a program tries to run program code in another file, but the code does not exist or is corrupt. Although this error can result from problems with files other than DLLs, they are the most likely cause. While it is possible to troubleshoot such errors, the quickest and easiest way to solve the problem is often to reinstall the application.

Return to contents page


General Protection Faults

One of the most frequent problems with Windows has a large number of possible causes, and is consequently difficult to track down.

A General Protection Fault, or GPF, occurs when a program tries to access an area of memory which does not belong to it. The reason it tries to do this is usually because theres a bug in the program, or an external factor has caused the program to behave erratically. For example, there may be a bug in another program which the apparently faulty application is dealing with. The bug may be causing the application to receive erroneous data or commands, causing it to fail. Another scenario is a bugged program damaging Windows, but not badly enough to cause it to fail immediately. You close the faulty program, unaware of any problem, and start up another application which causes the instability to surface.

When you see a GPF, it is tempting to breathe fire at the vendor. But the fault could lie elsewhere, in which case the GPF is just a symptom. A favourite source of these difficulties is the video driver. If you get regular GPFs, one of the first things to try is to switch video driver to the standard VGA one supplied by Microsoft. If the GPFs vanish, you need an updated driver, not a fixed application.

But suppose thats not your problem. How do you pinpoint the source of frequent GPFs? Microsoft publishes a troubleshooting guide. It is document number Q95505 and can be obtained from the Knowledge Base, either online at www.microsoft.com/kb or from the TechNet CD (see Getting Help). A shorter version is also printed in the Windows Resource Kit. The full guide in Q95505 is about the same length as a six-page feature in PC Plus, so it is not possible to summarise it here without omitting vital information. If you have issue 99 of PC Plus, there's a three-page guide in the Hands On section.

Return to contents page


Temporary files

Applications commonly create temporary files, and normally they live in a directory specified in an environment variable called TEMP. You will find the definition in AUTOEXEC.BAT in a line like this:

set temp=c:\temp

The default setting for TEMP under DOS 6.22 is the DOS directory but it is a good idea to se up a dedicated TEMP directory, as in the line above.

When an application is shut down, it should delete its temporary files. This doesnt always happen, however, and files are left occupying disk space. They serve no purpose when Widows is not running and the applications which created the files wont be looking for them next time. They will create new files when required. So any temporary files you can see before Widows loads can be deleted.

It is easy to spot temporary files if you have set up a directory specifically for them. They have the file extension .TMP, and on some machines there are dozens of the things. Make sure your TEMP variable points at a directory dedicated to temporary files. You could then insert the following command in AUTOEXEC.BAT:

DEL %TEMP%\*.tmp

This would be placed after the SET TEMP= line and before the WIN command, if it is present. Your temporary directory will be cleaned out every time the PC starts up. As reader John Barnett pointed out, though, the trouble is that some applications set up subdirectories within the temporary one, and the above command will not clear those. The following will, however:

if not exist %temp%\*.* goto carryon

deltree /y %temp% > nul

md %temp%

:carryon

It is vital that the temporary directory does not contain files you want to keep, because the above will wipe everything.

The most common cause of undeleted temporary files is crashed applications, and switching off the machine without closing everything down.

Return to contents page


Minesweeper & Solitaire cheats

Is your only real problem being unable to beat all comers at Minesweeper? It is not mine, because I cheat. Run Minesweeper and minimise Program Manager. In Minesweeper type XYZZY then [Return] and then [Shift]. The pixel at the top left of the desktop will now turn white whenever you move the mouse pointer over an un-mined square. If you are playing three-draw Solitaire, hold down [Ctrl][Alt][Shift] while clicking on the deck. Itll turn one card at a time.

Return to contents page


Closing crash

Many people experience a crash when they close down Windows. The PC just locks up. When that happens you need to go through a checklist of potential causes:

•	There could be a problem with upper memory - not correctly set up, HIMEM.SYS unable to provide access to it, or two programs are trying to use the same part of it.

•	Using WINSTART.BAT to install TSRs when Windows loads.

•	Network card not correctly terminated.

•	Corrupted WAV file playing as the Windows exit sound.

The things you should try in order to fix the problem are:

•	Remove DOS=HIGH from CONFIG.SYS. Restart the system. If this works, there is a problem with upper memory. Try running MEMMAKER (or equivalent configuration program if you are using a third-party memory manager) to see if it can resolve possible conflicts. If the problem persists, you would need to follow a trouble-shooting procedure for upper memory conflicts. This can be quite long-winded and does require a degree of knowledge and confidence in what you are doing. I will cover it in a future Help Screen if  anyone wants me to pursue it.

•	Try using a different A20 handler. See the MS-DOS User's Guide for more information.

•	Using WINSTART.BAT doesnt guarantee problems, but if you have one, try eliminating it. If that works, load the TSRs from AUTOEXEC.BAT instead.

•	Try removing the Windows exit sound - use another WAV file or none at all. Select the Sound icon in Control Panel. In the Events box, choose Windows Exit. Then, in the Files box, choose <none> and click OK.

•	You can also try removing and reinstalling Windows drivers for video and network, both of which have caused problems for me in the past. If removing a driver stops the crashes, try to obtain an update.

Return to contents page


Windows off-screen

If a window's title bar has somehow strayed off the screen, the easiest way to bring it home is to make Control Panel the active window and press [Alt] plus the spacebar. This will bring down its control menu. Press [M] for move and the cursor should turn into a four-headed arrow. Use the arrow keys to relocate the window and then press [Return]. An alternative is to bring up Task Manager - press [Ctrl][Esc] - then click on the Control Panel item and press Cascade.

Return to contents page


No cursor blinking

To stop the cursor blinking completely go to the [windows] section in WIN.INI and set 'Cursorblinkrate' to equal 0.

Return to contents page


Restore the standard icons

If you have accidentally deleted some of Program Manager's icons then go to File, Run and enter:

setup /p

to restore the original ones. It is easier to delete the duplicates than recreate the missing ones.

Return to contents page


Network security

On one of the Windows for Workgroups disks there is a file ADMINCFG.EX_. Use the Expand utility to extract it. It is an application for implementing better security measures on your network.

Return to contents page


Replace Program Manager with File Manager

Edit this line in SYSTEM.INI:

shell=progman.exe

to read...

shell=fileman.exe

(or some other application).

Restart Windows and the named progrm will replace Program Manager.

Return to contents page


Program Manager tips

•	To prevent the start-up group programs running, hold down [Shift] when Windows starts.

•	Save Program Manager settings without restarting Windows by pressing [Shift][Alt][F4].

•	Desktop organisation tip for screens bigger than 14 inches. Minimise all open programs, including Program Manager, except the one you work with most. Press [Ctrl][Esc] to bring up the task list. Click the Tile button. The main program window will fill the screen, except for a strip of naked desktop along the bottom. In here, the icons for the other active programs will be neatly lined up. Double-clicking on any of them will pop it up over the top of the main programs window. Clicking its minimise button will make it fall back into line as an icon. This makes it very easy to switch from one program to another, if you have got enough screen space for the strip.

•	Change the order in which you tab through groups in Program Manager by editing PROGMAN.INI. In the [Groups] section you can select the order from the numbers, for example Group1 = main.grp.

•	The Program Manager title bar can be renamed to give a message of your choice. Open the Startup group and create a new icon whose command line is PROGMAN.EXE. Set the description to whatever you want to rename Program Manager to. Double-click the icon. There is an extension to this which makes it practically useful as well as fun. If you alter the properties of the copy of Program Manager run from the Startup group and give it a shortcut key (for example [Ctr][Shift][Z]) you can instantly switch back to the desktop without having to go through Task Manager or repeated pressing of [Alt][Tab]. You can even modify the Program Managers title-bar to include a reminder of the shortcut combination.

Return to contents page


Customise File Manager's toolbar

It is quite easy to customise the Windows for Workgroups File Manager toolbar (this will not work in standard Win3) , though a few enquiries among friends revealed that none of them knew the fact. Just double-click a blank area of the toolbar, and a dialog box will appear. Buttons and separator gaps may be removed, added and reordered. The available buttons are restricted to options available through the menus.

Return to contents page


Install a RAM drive

What do you do if you have got 32Mb of memory installed, you are running Windows 3, and you think your applications are not causing Windows to use up all of the memory? Is there a way to allocate some of it to a function which gives you some benefit? Yes there is: install a RAM drive. This is an old trick which a lot of people used under DOS, but almost lost favour when Windows proved to be such a memory hog and free RAM was in short supply on most machines.

Nowadays, though, a great big wodge of RAM is affordable, and you can use some of it for luxuries like a RAM drive. This is an area of memory set aside and made to behave like a disk drive. Being located in memory, it is many times quicker to access than a normal disk.

Add the following line to CONFIG.SYS:

device=c:\windows\ramdrive.sys 2048 512 256 /E

Obviously, change the path if your Windows directory is called something different. If Windows didnt have its own version of RAMDRIVE.SYS, you will have to use the one in the DOS directory.

The /E puts the RAM drive in extended memory. The three figures are the disk size in kilobytes (giving 2Mb here - choose your own figure), the sector size in bytes (leave it as 512), and the number of directory entries allowed. 256 is an arbitrary amount - increase it if you have problems.

After rebooting the machine, you will be able to access an extra disk drive. Remember that being in memory, if you switch off, reboot or experience a crash, its contents are lost - dont go saving data files in there. So what use is it? With the RAM drive set up you can edit AUTOEXEC.BAT to include the following lines. They assume that the RAM drive is designated E:

md e:\temp

set temp=e:\temp

This means that temporary files are created in memory, making them quicker to work on. Since Windows spends a significant amount of time accessing temporary files, you should see a performance boost. You will need to reboot again before the new setting takes effect.

This tip could be useful on machines with as little as 16Mb if they are not too hard pushed. If you get nasty problems when printing files, it means that the print spool file was too big for the RAM drive . Increase the drives size if this happens.

Return to contents page


SmartMon doesnt work

If SmartMon does not work, I guess you have 32-bit file access enabled. The software module which implements 32-bit file access uses its own cache program, VCACHE.386. With this running, SmartDrive only works with floppies and, with SmartDrive v5.0 onwards, CD-ROM drives, so you wont see any results in the Cache Hit Rate diagram. You can confirm this by starting Windows for Workgroups with 32-bit file access disabled - run it with WIN /D:C and SmartMon should now work.

Return to contents page


Running out of resources

Windows 3 sets aside three areas of memory, called heaps, to store things like data associated with open windows, and graphical objects such as icons, cursors and fonts. Each heap is limited to 64K in size, no matter how much RAM is fitted. If one or more of the heaps fills up, you will get errors such as programs crashing and out-of-memory reports. Ploughing on after the warning message just makes matters worse, because every program consumes resources, and a GPF or other failure is inevitable if there are none left.

You can check heap capacity from the Help, About dialog box in many programs, such as Program Manager and File Manager. The percentage free figure refers to whichever heap has the least free space. On my system it is about 85 per cent immediately after boot-up. I expect it is lower on yours.

Upgrading to DOS 6 wont make more space in your resource heaps. This is purely a Windows problem. Upgrading to Win95 would increase capacity, because this was such a common difficulty that Microsoft took the opportunity to make bigger heaps.

You are not forced to upgrade to Win95 to find a fix, though. You can do some housekeeping and take precautions which will make more room:

•	Cut the number of installed fonts to a minimum - they are a major consumer of resources.

•	Keep open group windows to a minimum in Program Manager. They take up resources, even if you subsequently minimise them. But they do not take up resources if they are minimised when Windows starts up.

•	Full-screen wallpaper takes more resource space than a smaller image, either centred or tiled. If you are desperate, have no wallpaper at all. That might make Windows run faster, too.

•	Dont run several programs at once if you dont have to - including fancy screen savers.

•	Some programs leak resources. This is a fault in the program code which stops them releasing resource space when closed down. If you run such a program repeatedly, the free resources will creep down each time. Use the About box to do a before-and-after test of the programs you use most often. If you have a resource leaker, the only solution is an upgrade.

•	If you leave your PC switched on all the time, make a point of rebooting every day. This reclaims lost resources.

Return to contents page


Windows' memory limit

As long as the processor is 386 or above, Windows is being run in Enhanced Mode, and the version of HIMEM.SYS being used is 3.07 or greater, then Windows 3.1 can access 256Mb total physical and virtual memory (the swap file). The 16Mb limit is a popular misconception. Windows 3.0 was limited to 16Mb, and Win3.1 can follow suit under certain circumstances such as when running on a 286 computer or using an old version of HIMEM.SYS or on a few problematical machines.

Return to contents page


How to make your own help file

Producing simple help files is not hard, but it is certainly fiddlier than knocking out an equivalent word processor document. The tedious bits are inserting codes which set up help file features like the links which the user clicks on to jump around the file and the keywords listed in the index. You can get programs designed to assist with authoring help files.

If you want a taste of help file authoring at its most basic, you need a word processor which can export documents in Rich Text Format (RTF), and which supports footnotes, hidden text, double-underlines, and enables you to insert page breaks. Almost any mainstream word processor should be suitable. The other thing you need is a compiler program which converts the RTF file into HLP format, which is what the help engine uses. A help file compiler is often supplied with programming languages - it is included with VB4, for example.

Fortunately, the required program was included on the April 1997 SuperCD as part of Delphi 1. So install Delphi and copy the files \DELPHI1\BIN\HC31.EXE and HC31.ERR into the directory where youll construct help files. You will also find a detailed tutorial on how to make a help file - it is \DELPHI1\BIN\CWH.HLP. After copying these files, you can uninstall Delphi.

Here is a quick run-through of the bare minimum you must do to create a help file. First, write the text in your word processor. Each topic must be on a page of its own, so insert a page break after each one. Topics must also have a unique label by which the help engine identifies them. These labels are used to set up links and must be inserted as footnotes to the topic pages - insert the footnote marker just behind the topics title. The key points are that the marker symbol must be #, and that the footnote names must not include spaces, punctuation marks or symbols like & and -. The underscore character is OK, though.

In Word, for example, youd put the insertion point at the start of the title, go to Insert, Footnote, define a Custom Mark of #, then click OK. Youd then be expected to type the bookmark text, which would be the topics label - use whatever naming system you like.

Links are set up as follows. Select the text which is to be a link and format it with a double underline. Immediately follow it with the label of the target topic, omitting the #. Set the label text to hidden format You might want to make the first page of your file a contents page. There is nothing special about this - it is just a list of topics made into links.

Save the file in RTF (not RFT) format. You now need to write a project file which tells the help file compiler certain important information. There are many options you can put in here, but about the minimum youd want are:

[OPTIONS]

TITLE=title

ERRORLOG=log_filename

[CONFIG]

BrowseButtons()

[FILES]

RTF_filename_1

Here, title is what goes in the help title bar while log_filename is the name of a file into which the compiler can report any problems it found. The inclusion of BrowseButtons() turns on the << and >> buttons which enable the user to page back and forth among topics. Finally comes the name of the RTF source file.

The project file should be saved as plain text in the same directory as the RTF file and given the extension .HPJ. The help file compiler, HC31.EXE (or one of similar name if you are not using the compiler supplied with Delphi 1) and HC31.ERR should be placed in the same directory as the RTF and HPJ files. Go to the DOS prompt and change into the working directory. Suppose youd saved the project file as HELPTEST.HPJ. Youd now type:

HC31 HELPTEST

If the help compiler couldnt complete the job, youll find an error log file whose name you specified, containing details. Otherwise you should have a .HLP file which you can double-click from File Manager or Explorer.

Having the browse buttons turned on is not enough to make them do anything. You must specify the sequence of topics among which the buttons move back and forth. This is done by adding further footnotes to the pages, using + as the identifying character, and inserting more codes. Keywords for the index are handled via the K and $ footnotes, all of which are explained in CWH.HLP.

If you decide to author help files with only your word processor and the compiler, it would be a good idea to have macros on buttons to insert page breaks and the various kinds of footnote.

Return to contents page


Group limit in Win3.x

The limit on the number of items in a program group is 50 in both Win3.0 and Win3.1. Win3.0 allowed an unlimited number of groups, while Win3.1 reduced the figure to 40. Im afraid theres no way round this short of having spring clean of Program Manager to make room for new groups.

Return to contents page


Write tips

1 If you want to convert text files downloaded from the Internet into reformattable documents, Write can handle this as long as the end of each paragraph has a unique feature, such as a double carriage return. The plan is to replace all the double returns with a sequence of characters that doesnt appear elsewhere in the text.

This keeps the paragraph end markers safe during the next step, which is to replace all the remaining carriage returns with a blank, or with a space, depending on whether line-ends already have spaces. Next, replace the unique character strings with double carriage returns, or with a carriage return plus tab, whichever style you prefer.

You can enter special characters in Writes Find and Replace dialogs by entering special codes. These are listed in the help file. To save you the trouble of looking them up, here they are:

^d 	Page break inserted in file with [Ctrl][Enter]

^p 	Paragraph mark (carriage return)

^t 	Tab character

^w 	Space character

? 	Wildcard - any character or string of characters

After replacing the paragraph marks, it is not a bad idea to do a repeated search and replace, changing two spaces into one. Most word processors enable you to perform a similar trick, though the codes could be different.

2 If you want Write to start up with your own letter head and settings for ruler, font etc, create a blank document called DEFAULT.WRI which contains all these features. Save it in your Windows directory, Edit the Write icon properties to load DEFAULT.WRI - make the icon's command line:

WRITE.EXE DEFAULT.WRI

The only thing to watch out for is that when you save a document based on this file, that you use Save As instead of save, or you will overwrite DEFAULT.WRI

Return to contents page


The undefined dynalink error

A dynalink is simply a program trying to run a bit of program code resident in different file. Typically the called-up code would be in a dynamic link library (DLL). One of the main ideas behind DLLs is that programmers can avoid duplicating program code in different applications by putting it in one of these library files.

If the library code does not exist or it is corrupt, Windows will give you the 'undefined dynalink' message, and the application will close down. Typical causes of this problem are deleting a DLL or program file, renaming it, damaging it, or overwriting it with an old version which doesnt have the required portion of code. Note that not all dynalinks are from an EXE file to a DLL, and that DLL problems can result in errors other than the dynalink message.

Reinstalling Windows is often a quick solution to weird problems. That is not to say the problem might not have be solved with more finesse, but it might take longer. Knowing what you now do about dynalinks, there are a few ways you might diagnose the problem and devise a less brutal solution.

The best way is to use a utility that logs which files are being accessed. You would then try to start the program giving the error and see the name of the file causing the message. We put such a utility, Win-eXpose-I/O, on issue 121's SuperCD. It can also be obtained from http://www.shetef.com.

With luck, once you have identified the missing or damaged file, you can reinstate it from your Windows installation disks and everything will be back to normal.

Return to contents page


The stack overflow error

This topic deals with a message from Windows along the lines of: 'Windows Protection Error. You need to restart your computer. An Internal stack overflow has caused this session to be halted. Change the stacks setting in your CONFIG.SYS file and then try again'. This is actually the Win95 version of the message, but Win3 can suffer from the same fault.

If there is not a STACKS line in CONFIG.SYS, you need to edit one in. It should be in the form:

STACKS = x, y

Try 18, 256 for x and y. Reboot the PC. If you still get the message, try higher values of x. If you get unexplained crashes, try bigger y values.

When a piece of hardware generates an interrupt to tell the processor that it needs to convey information, the currently executing program pauses while the hardware delivers its data into memory. Normally this goes on to the currently active stack. As I explained in issue 129, a stack is an area of memory a program can use as temporary storage - something like an array, but which can grow or shrink according to the amount of data which has to be stored.

The hardware makes use of the stack being belonging to the currently executing program. This is quicker than setting up a stack especially for the hardware interrupt because switching between stacks takes time. The downside is that the space inside which a stack can grow is limited. If the hardware tries to shove a lot of data on to a stack which the program had nearly filled, it will overflow. This is a potentially fatal error, so if Windows spots it happening before disaster strikes, itll warn you.

Values other than 0,0 in the STACKS line force a new stack to be created and switched into place for hardware interrupts. The consequential loss of performance can cause difficulties if the hardware generating the interrupt relies on high-speed communications, but it seems that you have no option but to give it a try.

Return to contents page


Getting help

If you want help with Microsoft products, a good first place to look is the Knowledge Base at www.microsoft.com/kb. While you can be sure that the online Knowledge Base is always up to date, Web access can be slow and theres the telephone bill to consider. Furthermore, if you are in a tech support role, you may want access to the information in a more portable format. In that case you might like to consider a subscription to TechNet. This is a monthly set of CDs containing the Knowledge Base, drivers, patches, resource kits, service packs, additional documentation such as extracts from books, and a lot more  at the time of writing TechNet occupies 15 CDs. The whole thing is fronted by a browser which offers searching and bookmarking facilities. At the time of writing a years single-user subscription cost £292.58 including VAT and was only available direct from Microsoft. The subscription centre is on 0800 281221. TechNet is not really suitable for individuals, but it is an invaluable resource for an organisation's in-house tech support team.

Return to contents page


The last resort

Many of the problems Ive talked about can take an age to solve - GPFs and crashing on close-down, for instance. Even after following a troubleshooting guide you might be no better off. Whenever you have an intractable problem which could be due to a conflict between pieces of software, or between software and hardware, reinstalling Windows and your drivers and applications often effects a cure.

On a PC which is not too loaded down, this can be quicker than working your way through a troubleshooting guide. I had a PC which invariably crashed when I closed down Windows. I lived with it for months because nothing I tried worked. Eventually I reinstalled everything and the problem went away. It took an hour or two, but that was far less time than Id wasted previously.

Dont be tempted to restore the system from a backup. Youll be restoring the problem too. Install everything from the original floppies or CDs. I recommend a fresh DOS installation while you are at it. Also, dont reinstall over the original software. Wipe the disk and start from scratch. Before you do that, make doubly sure that documents, templates, macros and other data files have been saved, and also that you have all the necessary drivers for CD-ROMs, video, sound and so on. Even though you dont intend to restore from a backup, it is a good idea to have one just in case you find something important is missing from the fresh installation.

Return to contents page


Maximising windows of applications opened from Program Manager

There is no setting to ensure a program always opens maximised. Some applications are hard-wired to open at a particular size while others open at the size they were when last closed down. Its a nuisance, so I have written a utility that you can use to always run an application maximised. Its MAXWIN.EXE on the SuperCD accompanying issue 135.

If you already have other programs written with VB4, all the required support files should be on your system. Copy MAXWIN.EXE to your Windows directory and try to run it. If it brings up its own dialog box saying it has nothing to do because you didnt supply a command line parameter, then youre OK. If Windows complains about missing files, you need to do a full installation. In that case run SETUP.EXE in the directory \HANDSON\HELPSCRN\MAXWIN on the SuperCD, and opt to install to your Windows directory. You can delete the MaxWin program group thats set up because you dont run MaxWin from its own icon - its integrated into the icon properties of other programs.

Each program to be launched maximised should have its Program Manager icon edited as follows. Click the icon and go to File, Properties. Click Change Icon and make a note of the filename and icon shown in the dialog box. Click OK. Edit the Command Line box so that its present contents are preceded by MAXWIN.EXE. For example, Write has this command line:

WRITE.EXE

You would change it to:

MAXWIN.EXE WRITE.EXE

Click on Change Icon again. If the dialog box now specifies MAXWIN.EXE, change it back to what was there before. OK your way out. The application should now always launch the program maximised. MaxWin is slow the first time it is run during a session, because Windows has to find and open all the support DLLs. After that its operation is much quicker and may not cause noticeable delay.

Return to contents page


Quick directory access

If you regularly need to return to a particular directory in File Manager, assign it to a new drive letter using the SUBST command. The letter will then appear on the File Manager drive bar for instant access. For example if drive letter G is free, you could put this line near the end of AUTOEXC.BAT:

SUBST G: C:\PROJECTS\BIGONE\

This needs to be done after any lines which themselves assign drives to letters, such as MSCDEX.

This tip has a potential drawback. Some programs don't like drives created with SUBST. In particular, 32-bit file access is incompatible with it. Also, you may need to insert or amend the LASTDRIVE letter in CONFIG.SYS:

LASTDRIVE=x

Where 'x' represents the last valid drive letter DOS will recognise. Don't fiddle with this setting if SUBST works OK.

Return to contents page